<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'commonTags.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

	</head>

	<body>
		姓名：<s:property value="name"/>,${name }<br/>
		时间：<s:property value="date"/><br/><s:date name="date" format="yyyy-MM-dd"/><br/><s:date name="date"/><br/>
		用户列表：
		<ul>
			<s:iterator value="users" status="status">
				<li><s:property value="#status.count"/>,<s:property value="userName"/>,${age }
			</s:iterator>
			<br/>过滤后，年龄大于等于18<br/>
			<s:iterator value="users.{?#this.age>=18}" status="status"><!-- 问号可以用^代替，表示符合条件的第一个，$表示符合条件的最后一个 -->
				<li><s:property value="#status.count"/>,<s:property value="userName"/>,${age }
			</s:iterator>
		</ul>
		<hr/>
		<s:set var="i" value="10" scope="request"></s:set>
		<s:push value='"tom"'><s:debug></s:debug></s:push>
		<hr/>
		<s:bean name="entity.Photo" var="photo"></s:bean><!-- 存在context中 -->
		<s:property value="#photo.name"/>,<s:property value="#photo.id"/>
		<hr/>
		<s:url></s:url><!-- 与当前url相同 --><br/>
		<s:url action="commonTags" namespace="/"></s:url><br/>
		<s:url action="listUser"></s:url>
		<s:action name="listUser" executeResult="true"></s:action><!-- 使用true，将action的结果追回到此页面，相当于include，使用false，action会执行，结果不追加 -->
	</body>
</html>
